<?php 
/////////////////////////////////for resize hight width///////////////////////////////////
function widthheight($imagename,$folder,$height_argu,$width_argu)

{







$memoryToAllocate = '100M';

$currentDir = dirname(__FILE__);

$docRoot=$folder."/";



$size = GetImageSize($docRoot . $imagename);

$mime = $size['mime'];





$width = $size[0];

$height = $size[1];



$maxWidth = (isset($width_argu)) ? (int) $width_argu : 0;

$maxHeight = (isset($height_argu)) ? (int) $height_argu : 0;



// Ratio cropping

$offsetX = 0;

$offsetY = 0;



if($height_argu>$height)

$maxHeight=$height;

if($width_argu>$width)

$maxHeight=$width;

// Setting up the ratios needed for resizing. We will compare these below to determine how to

// resize the image (based on height or based on width)

$xRatio = $maxWidth / $width;

$yRatio = $maxHeight / $height;



if ($xRatio * $height < $maxHeight)

{ // Resize the image based on width

$tnHeight = ceil($xRatio * $height);

$tnWidth = $maxWidth;

}

else // Resize the image based on height

{

$tnWidth = ceil($yRatio * $width);

$tnHeight = $maxHeight;

}

$var_string=$tnWidth."alada123".$tnHeight;

return $var_string;



}


///////////////////////////////////end////////////////////////////////////////////////////
?>